package itheima.demo01;

import java.util.ArrayList;

public class test {
    public static void main(String[] args) {
        //创建一个成员变量
        ArrayList<Student> list = new ArrayList<>();

        Student stu1 = new Student("zhangsan", 23, "男");
        Student stu2 = new Student("lisi", 25, "女生");
        Student stu3 = new Student("wangwu", 65, "男");

        //添加成员变量
        list.add(stu1);
        list.add(stu2);f
        list.add(stu3);

        //测试
        int maxAgeStudent = StudentUnit.getMaxAgeStudent(list);

        System.out.println(maxAgeStudent);
    }
}
